package org.csu.code.api.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.stereotype.Component;

import java.util.Date;

@Data
@Component
@TableName("rent")
public class Rent {
    @TableId(value = "rentid", type = IdType.INPUT)
    private int rentid;
    private int userid;
    private int farmid;
    @TableField(value = "rentArea")
    private Double rentArea;
    @TableField(value = "startTime")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+08")
    private Date startTime;
    @TableField(value = "endTime")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+08")
    private Date endTime;
    private int status;
    private String crop;
    private boolean delivery;
    private boolean proxy;
    private boolean training;
    private boolean resources;
    private String others1;
    private String others2;
    private int length;
}
